# Maintainer : Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor : Allan McRae <allan@archlinux.org>
# Contributor: Julien MISCHKOWITZ <wain@archlinux.fr>

pkgname=shake
pkgver=1.0
pkgrel=3
pkgdesc="Userspace defragmenter that can be run while system is in use"
arch=('loong64' 'x86_64')
url="https://vleu.net/shake/"
license=('GPL3')
depends=('attr')
makedepends=('cmake' 'help2man')
install=$pkgname.install
source=($pkgname-$pkgver.tar.gz::https://github.com/unbrice/shake/archive/v$pkgver.tar.gz)
sha512sums=('f73601ebf37ac934b2cfb5bcedd530e38bd6873615e80eae01c690bf935ed3924abb1d06fb31c46397b5804d47a36584ac5e11b4c7142b46e570ddbf3abe1775')

build() {
  cd "${srcdir}"/${pkgname}-${pkgver}/build

  cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr ..
  make
}

package() {
  cd "${srcdir}"/${pkgname}-${pkgver}/build

  make DESTDIR="${pkgdir}" install
}
